import panelStartIcon from '@/assets/wf-icon/panel-start-icon-small.png'
import panelStopIcon from '@/assets/wf-icon/panel-stop-icon-small.png'
import panelApproveIcon from '@/assets/wf-icon/panel-approve-icon.png'
import panelTextIcon from '@/assets/wf-icon/panel-text-icon-small.png'
import panelDivergeIcon from '@/assets/wf-icon/panel-diverge-icon-small.png'
import panelMergeIcon from '@/assets/wf-icon/panel-merge-icon-small.png'
import panelTimerIcon from '@/assets/wf-icon/panel-timer-icon-small.png'


export default {
    name: "wfPanel",
    // 拖拽面板的定义
    set(wf) {
        wf.extension.dndPanel.setPatternItems([
            {
                type: 'custom-start',
                text: '开始',
                label: '开始节点',
                icon: panelStartIcon,
                style: 'iconStyle'
            },
            {
                type: 'custom-approve',
                label: '审批节点',
                icon: panelApproveIcon
            },
            {
                type: 'custom-diverge',
                label: '分支节点',
                icon: panelDivergeIcon
            },
            {
                type: 'custom-merge',
                label: '合并节点',
                icon: panelMergeIcon
            },
            {
                type: 'custom-timer',
                label: '定时任务',
                icon: panelTimerIcon
            },
            {
                type: 'custom-text',
                label: '文本标签',
                icon: panelTextIcon
            },
            {
                type: 'custom-stop',
                text: '结束',
                label: '结束节点',
                icon: panelStopIcon
            },
        ]);
    }
}